package com.artPreter.controller;


import com.artPreter.pojo.ArtistTemp;
import com.artPreter.pojo.DepartTemp;
import com.artPreter.pojo.Result;
import com.artPreter.service.IArtistTempService;
import com.artPreter.service.IDepartTempService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 艺术家模板内容表 前端控制器
 * </p>
 *
 * @author jarvis
 * @since 2024-11-23
 */
@RestController
@RequestMapping("/artistTemp")
public class ArtistTempController {


    @Autowired
    private IArtistTempService artistTempService;

    /**
     * 获取艺术家模板，如果没有模板则添加一个新模板
     * @param
     * @return
     */
    @PostMapping("/getArtistTemp")
    public Result<ArtistTemp> getArtistTemp(@RequestBody ArtistTemp artistTemp){
        ArtistTemp reulst = artistTempService.getArtistTemp(artistTemp);
        return Result.success(reulst);
    }

    @PostMapping("/saveArtistTemp")
    public Result saveArtistTemp(@RequestBody ArtistTemp artistTemp){
        artistTempService.sveArtistTemp(artistTemp);
        return Result.success();
    }

}
